Skip to content

feat: noise-filter the health sync dashboard + repo_cleanup hygiene nudge#42

Merged
Jammy2211 merged 1 commit into
mainfrom
feature/health-sync-noise-filter
Jul 9, 2026
Merged

feat: noise-filter the health sync dashboard + repo_cleanup hygiene nudge#42
Jammy2211 merged 1 commit into
mainfrom
feature/health-sync-noise-filter

Conversation

@Jammy2211

Copy link
Copy Markdown
Contributor

Summary

The venv-startup health table printed raw git status --porcelain per repo — ~1,000 lines of regenerated dataset artifacts burying the ~5 real dirty files. This routes every repo's porcelain through the existing heart.noise classifier (one batched call, within the <10s budget): MOD/UNTR count real drift only, a NOISE column carries the artifact count, real files are listed with noise collapsed to a one-line summary. health --all restores the raw view; classifier failure degrades gracefully to the old output.

Also closes the cadence loop for /repo_cleanup: the dashboard ends with a "Hygiene:" nudge when the sweep's audit stamp (~/.cache/pyauto/repo_cleanup_last_audit.json) is missing or older than PYAUTO_CLEANUP_NUDGE_DAYS (default 7).

Closes #41.

API Changes

Additive on the python side: heart.noise gains split_lines() (line-level split, codes intact) and a --batch <dir> --real-out <dir> CLI mode; classify_dirty() is reimplemented on top with unchanged behaviour. The dashboard's table format changes (new NOISE column, ~ flag, real-only dirty listing) — anything parsing health output visually gains a column. noise_globs additions mean the census now classifies *.npy / tracer_*.json / point_dataset*.csv / *dataset.json / *summary_v*.json as noise.
See full details below.

Test Plan

  • pytest tests/ — 223 passed (22 in test_noise.py incl. new split/batch/glob tests)
  • Live run against the real workspace: noise-only repos collapse to ~ one-liners; real drift (5 modified .py in autolens_workspace_test) listed
  • health --all reproduces the raw listing
  • Nudge fires on stale (12-day) and missing stamp; silent on fresh
  • Fallback verified: running against a Heart checkout without --batch degrades to raw counts + (noise classification unavailable) note
Full API Changes (for automation & release notes)

Added

  • heart.noise.split_lines(porcelain_lines, noise_globs) — (real_lines, noise_lines) with porcelain codes intact
  • heart.noise.run_batch(in_dir, real_out, config) + CLI python -m heart.noise --batch <dir> --real-out <dir> — per-repo counts on stdout (name\treal_mod\treal_untr\tnoise), real-only porcelain per file; no sidecar written
  • health --all — full raw dirty listing (dispatcher routes leading-dash args to sync)
  • PYAUTO_HEART_HOME — override the Heart checkout used for classification
  • PYAUTO_CLEANUP_NUDGE_DAYS — hygiene-nudge threshold (default 7)
  • noise_globs: *dataset.json, *tracer_*.json, *point_dataset*.csv, *.npy, *summary_v*.json

Removed

  • None. heart.noise --name/--out sidecar mode unchanged (now validated manually instead of argparse required=, same errors).

Migration

  • None required. The dashboard output gains a NOISE column and ~ flag; health --all gives the previous listing.

🤖 Generated with Claude Code

…udge

The startup health table printed raw porcelain — ~1,000 lines of regenerated
dataset artifacts burying the handful of real dirty files. Route every repo's
porcelain through the existing heart.noise classifier in one batched call:
MOD/UNTR now count real drift only, a NOISE column carries the artifact count,
and the dirty listing shows real files with noise collapsed to a one-line
summary (health --all restores the raw view; classifier failure degrades to
the old output with a note).

Also: noise_globs gains the classes the 2026-07-09 /repo_cleanup sweep found
slipping through (*.npy, tracer_*.json, point_dataset*.csv, *dataset.json,
versioned *summary_v*.json), and the dashboard ends with a hygiene nudge when
the /repo_cleanup audit stamp (~/.cache/pyauto/repo_cleanup_last_audit.json)
is missing or older than PYAUTO_CLEANUP_NUDGE_DAYS (default 7).

Closes #41.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@Jammy2211 Jammy2211 added the pending-release Merged changes awaiting the next release cycle label Jul 9, 2026
@Jammy2211 Jammy2211 merged commit 55e6a23 into main Jul 9, 2026
4 checks passed
@Jammy2211 Jammy2211 deleted the feature/health-sync-noise-filter branch July 9, 2026 09:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pending-release Merged changes awaiting the next release cycle

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: noise-filter the health sync dashboard + repo_cleanup hygiene nudge

1 participant